package 第六周.homework;
//complie a program,read 0~50 arbitrary integer number and compute every text show times.
//Use a number expect from 0 to 50 to quit this input.then output the result.
import java.util.Scanner;
public class pp8_1
{
    public static void main(String []args)
    {
        final int NUM = 51;
        int num;
        int[] team = new int[NUM];
        do {
            Scanner scan = new Scanner(System.in);
            System.out.println("please enter a number :");
            num = scan.nextInt();

            //Count the number of each entered number.
            if(num>=0&&num<=50)
                team[num] +=1;

        }
        while((num >= 0) && (num <= 50));



        //Print the results.
        System.out.println();
        for(int b=0 ; b < team.length; b++)
        {
            System.out.println(b +": \t"+team[b]);
        }
    }
}



